import type { AxiosRequestConfig } from 'axios'
import type { ApiResult } from '@/types/app'
import type { RequestOptions } from '@/utils/http'
import { http } from '@/utils/http'
/**  在线供给统计（在线） */
export function getOnlineStatistics(config?: AxiosRequestConfig<any>, options?: RequestOptions) {
  return http.get<ApiResult<any>>({ url: '/dms-mask-center/api/v1/task/overview/online/statistics', ...config }, options)
}
/**  获取任务下拉用数方 */
export function getListTaskUseDataParty(dataType: string, options?: RequestOptions) {
  return http.get<ApiResult<any>>({ url: `/dms-mask-center/api/v1/task/overview/online/listTaskUseDataParty/${dataType}` }, options)
}
/*** 数据共享供给、开发测试服务量统计(TOP10)（在线） */
export function getOnlineSupplyTest(config?: AxiosRequestConfig<any>, options?: RequestOptions) {
  return http.get<ApiResult<any>>({ url: '/dms-mask-center/api/v1/task/overview/online/supplyTest', ...config }, options)
}
/** 离线供给统计（离线） */
export function getOfflineStatistics(config?: AxiosRequestConfig<any>, options?: RequestOptions) {
  return http.get<ApiResult<any>>({ url: '/dms-mask-center/api/v1/task/overview/offline/statistics', ...config }, options)
}
/**最近一周服务情况统计（离线） */
export function getOfflineLastestServiceStatistics(config?: AxiosRequestConfig<any>, options?: RequestOptions) {
  return http.get<ApiResult<any>>({ url: '/dms-mask-center/api/v1/task/overview/offline/lastestServiceStatistics', ...config }, options)
}
/** 敏感数据类型分布（离线）  */
export function getOfflineSensitiveDataTypes(config?: AxiosRequestConfig<any>, options?: RequestOptions) {
  return http.get<ApiResult<any>>({ url: '/dms-mask-center/api/v1/task/overview/offline/sensitiveDataTypes', ...config }, options)
}

/** 敏感工具箱统计（工具箱） */
export function getToolboxStatistics(config?: AxiosRequestConfig<any>, options?: RequestOptions) {
  return http.get<ApiResult<any>>({ url: '/dms-mask-center/api/v1/task/overview/tool/statistics', ...config }, options)
}

/**  服务类统计【按文件类型】(TOP10)（工具箱）*/
export function getToolboxFileStatistics(config?: AxiosRequestConfig<any>, options?: RequestOptions) {
  return http.get<ApiResult<any>>({ url: '/dms-mask-center/api/v1/task/overview/tool/fileStatistics', ...config }, options)
}
/** 最近一周服务情况统计（工具箱）*/
export function getToolboxLastestServiceStatistics(config?: AxiosRequestConfig<any>, options?: RequestOptions) {
  return http.get<ApiResult<any>>({ url: '/dms-mask-center/api/v1/task/overview/tool/lastestServiceStatistics', ...config }, options)
}
